package com.qfjy.homework.bianjiahua;

/** 测试类
 * @author bjh
 * @version 1.0
 * @date 2023/4/1 16:33
 */
public class Test {

    public static void main(String[] args) {

        ExecutMan executMan = new ExecutMan();//执行者对象

        Manager manager = new Manager();//管理者对象

        //第1次设置状态
        executMan.setStatus("Status #1");
        executMan.setStatus("Status #2");
        manager.add(executMan.saveStatusToMemorandum());
        //第2次设置状态
        executMan.setStatus("Status #3");
        manager.add(executMan.saveStatusToMemorandum());
        //第3次设置状态
        executMan.setStatus("Status #4");

        System.out.println("Current Status: " + executMan.getStatus());//当前状态
        executMan.getStatusFromMemorandum(manager.get(0));
        System.out.println("First saved Status: " + executMan.getStatus());//第1次设置状态
        executMan.getStatusFromMemorandum(manager.get(1));
        System.out.println("Second saved Status: " + executMan.getStatus());//第3次设置状态

    }

}
